<?php
/**
 * Created by PhpStorm.
 * User: Azrael
 * Date: 2016/2/23
 * Time: 23:01
 */

namespace Home\Logic;


use Home\Model\NewslistModel;

class NewsListLogic
{
    private $model = null;

    public function __construct()
    {
        $this->model = new NewslistModel();
    }

    /**
     * 获取列表信息
     * @param $fid
     * @return mixed
     */
    public function getList($fid)
    {
        $list =  $this->model->getNewsList($fid);
        if (!$list) {
            return false;
        }
        foreach ($list as $k => $v) {
            $data[$v['position']] = $v;
        }
        return $data;
    }
}